import { View } from "../../../mvc/core/View";
import { DisplayUtil } from "../../../common/DisplayUtil";
import { ObjCreate } from "../common/ObjCreate";
import { Language } from "../../../../extend/language/Language";
import { GlobalStyle } from "../../../common/global/GlobalStyle";
import { GTextFormat } from "../../../common/GTextFormat";
import { FontUtil } from "../../../common/font/FontUtil";
import { BgItem } from "../common/BgItem";
import { GTextArea } from "../../../../com/mui/controls/GTextArea";
//class PetIslandRulePanel
    
    export  class PetIslandRulePanel extends View
    {
        constructor(arg1: Boolean=false)
        {
            super();
            this._showCloseBtn = arg1;
            this.init();
            return;
        }

        /* internal  */closeBtnClickHandler(arg1: Object /* flash.events.MouseEvent */): void
        {
            DisplayUtil.removeMe(this);
            return;
        }

        /* internal  */init(): void
        {
            var loc6=null;
            ObjCreate.createBg(0, 0, 250, 355, this);
            ObjCreate.createGTextField(Language.getString(28105), 9, 5, 80, 20, this, GlobalStyle._textFormat5);
            var loc1=GlobalStyle.setTextFormatLeading(new GTextFormat(FontUtil.songtiName, 14, 11661311), 5);
            this._rule = ObjCreate.createTextArea("", 9, 25, 240, 265, this);
            this._rule.textField.defaultTextFormat = loc1;
            this._rule.htmlText = Language.getString(28226);
            ObjCreate.createGTextField(Language.getString(28245), 9, 290, 80, 20, this, GlobalStyle._textFormat5);
            var loc2=new BgItem(14031501);
            ObjCreate.setObjAttri(loc2, 24, 312, -1, -1, this);
            var loc3=new BgItem(14162001);
            ObjCreate.setObjAttri(loc3, 79, 312, -1, -1, this);
            var loc4=new BgItem(14012110);
            ObjCreate.setObjAttri(loc4, 134, 312, -1, -1, this);
            var loc5=new BgItem(14031310);
            ObjCreate.setObjAttri(loc5, 188, 312, -1, -1, this);
            if (this._showCloseBtn) 
            {
                (loc6 = ObjCreate.createGButton("", 0, 0, 19, 19, null, "CloseButton")).focusEnabled = true;
                loc6.configEventListener(flash.events.MouseEvent.CLICK, this.closeBtnClickHandler);
                ObjCreate.setObjAttri(loc6, 230, 1, -1, -1, this);
            }
            return;
        }

        /* internal */ /* var */_rule: GTextArea;

        /* internal */ /* var */_showCloseBtn: Boolean;
    }
